﻿@model Unijovem.UI.Models.ForumModel
@{
    ViewBag.Title = "Manter";
}
<h2>
    Manter</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>ForumModel</legend>
        <div class="editor-label">
            Tema
        </div>
        <div class="editor-field">
             @Html.DropDownListFor(model => model.IdTema, (SelectList)ViewBag.Temas)
            @Html.ValidationMessageFor(model => model.IdTema)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Assunto)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Assunto)
            @Html.ValidationMessageFor(model => model.Assunto)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.TextoBase)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TextoBase)
            @Html.ValidationMessageFor(model => model.TextoBase)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.DataInicio)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataInicio)
            @Html.ValidationMessageFor(model => model.DataInicio)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.DataFinal)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataFinal)
            @Html.ValidationMessageFor(model => model.DataFinal)
        </div>
        @if (Model != null && Model.Id != 0)
        {
            @Html.HiddenFor(model => model.Id)
        }
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
